import Loadable from "react-loadable"  // 实现路由懒加载  
import { Spin } from 'antd';
function LoadingBox() {
    return (
        <div style={{ width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
            <Spin size="large" tip="Loading..." />
        </div>
    )
}

export default (loadCpt, loading = LoadingBox) => Loadable({ loader: loadCpt, loading })